//////////////////////////////////////////
// Proxy generated class
//////////////////////////////////////////

package Phase2;

import Phase1.Command;
import Phase1.Client;
import Phase1.GlobalID;
import java.io.IOException;

public class NodeProxy
	extends Phase2.Node
{

	private static final long serialVersionUID = 1L;
	private GlobalID globalID;

	public NodeProxy(GlobalID globalID)
	{
		this.globalID = globalID;
	}

	public Phase1.GlobalID getGlobalID()
	{
		Command command = new Command(globalID, "getGlobalID", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase1.GlobalID) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase1.GlobalID) null;
	}

	public java.lang.String printAllNode()
	{
		Command command = new Command(globalID, "printAllNode", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (java.lang.String) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (java.lang.String) null;
	}

	public Phase2.Node getProxy()
	{
		Command command = new Command(globalID, "getProxy", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	public Phase2.NodeList getUpPointers()
	{
		Command command = new Command(globalID, "getUpPointers", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.NodeList) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.NodeList) null;
	}

	private void setUpPointers(Phase2.NodeList p0)
	{
		Command command = new Command(globalID, "setUpPointers", 
								new Class[]{Phase2.NodeList.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	private void setUpPointer(Phase2.Node p0)
	{
		Command command = new Command(globalID, "setUpPointer", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public Phase2.NodeList getDownPointers()
	{
		Command command = new Command(globalID, "getDownPointers", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.NodeList) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.NodeList) null;
	}

	private void setDownPointers(Phase2.NodeList p0)
	{
		Command command = new Command(globalID, "setDownPointers", 
								new Class[]{Phase2.NodeList.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	private void setDownPointer(Phase2.Node p0)
	{
		Command command = new Command(globalID, "setDownPointer", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public Phase2.NodeList getNeighbours()
	{
		Command command = new Command(globalID, "getNeighbours", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.NodeList) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.NodeList) null;
	}

	public Phase2.Node getNeighbour(Integer p0)
	{
		Command command = new Command(globalID, "getNeighbour", 
								new Class[]{Integer.class}, 
								new Object[]{p0}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private void setNeighbours(Phase2.NodeList p0)
	{
		Command command = new Command(globalID, "setNeighbours", 
								new Class[]{Phase2.NodeList.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	private void addNeighbour(Phase2.Node p0)
	{
		Command command = new Command(globalID, "addNeighbour", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public Phase2.Node getFold()
	{
		Command command = new Command(globalID, "getFold", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private void setFold(Phase2.Node p0)
	{
		Command command = new Command(globalID, "setFold", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public Phase2.Node getOldFold()
	{
		Command command = new Command(globalID, "getOldFold", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private void setOldFold(Phase2.Node p0)
	{
		Command command = new Command(globalID, "setOldFold", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public void setId(Integer p0)
	{
		Command command = new Command(globalID, "setId", 
								new Class[]{Integer.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public java.lang.Object getPayload(java.lang.String p0)
	{
		Command command = new Command(globalID, "getPayload", 
								new Class[]{java.lang.String.class}, 
								new Object[]{p0}, true);

		try
		{
			return (java.lang.Object) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (java.lang.Object) null;
	}

	public java.lang.Object setPayload(java.lang.String p0, java.lang.Object p1)
	{
		Command command = new Command(globalID, "setPayload", 
								new Class[]{java.lang.String.class, java.lang.Object.class}, 
								new Object[]{p0, p1}, true);

		try
		{
			return (java.lang.Object) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (java.lang.Object) null;
	}

	public java.util.Map getWholePayload()
	{
		Command command = new Command(globalID, "getWholePayload", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (java.util.Map) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (java.util.Map) null;
	}

	public void setWholePayload(java.util.Map p0)
	{
		Command command = new Command(globalID, "setWholePayload", 
								new Class[]{java.util.Map.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public java.lang.Object getLastBroadcast()
	{
		Command command = new Command(globalID, "getLastBroadcast", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (java.lang.Object) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (java.lang.Object) null;
	}

	public void setLastBroadcast(java.lang.Object p0)
	{
		Command command = new Command(globalID, "setLastBroadcast", 
								new Class[]{java.lang.Object.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public void broadcast(java.lang.Object p0)
	{
		Command command = new Command(globalID, "broadcast", 
								new Class[]{java.lang.Object.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	private Phase2.NodeOrRange goRight(Phase2.Node p0)
	{
		Command command = new Command(globalID, "goRight", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, true);

		try
		{
			return (Phase2.NodeOrRange) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.NodeOrRange) null;
	}

	private Phase2.Node getInsertionPoint()
	{
		Command command = new Command(globalID, "getInsertionPoint", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private void insertionFoldSetup(Phase2.Node p0, Phase2.Node p1)
	{
		Command command = new Command(globalID, "insertionFoldSetup", 
								new Class[]{Phase2.Node.class, Phase2.Node.class}, 
								new Object[]{p0, p1}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public Phase2.NodeList allNodes()
	{
		Command command = new Command(globalID, "allNodes", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.NodeList) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.NodeList) null;
	}

	private Phase2.Node removeLastNode()
	{
		Command command = new Command(globalID, "removeLastNode", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private Phase2.Node replaceNode(Phase2.Node p0)
	{
		Command command = new Command(globalID, "replaceNode", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private Phase2.Node getLastNode()
	{
		Command command = new Command(globalID, "getLastNode", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private void removeNeighbor(Phase2.Node p0)
	{
		Command command = new Command(globalID, "removeNeighbor", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	private void removeUp(Phase2.Node p0)
	{
		Command command = new Command(globalID, "removeUp", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	private void removeFold(Phase2.Node p0)
	{
		Command command = new Command(globalID, "removeFold", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	private void renewState()
	{
		Command command = new Command(globalID, "renewState", 
								new Class[]{}, 
								new Object[]{}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public Phase2.Node giveMeChild()
	{
		Command command = new Command(globalID, "giveMeChild", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	public int compareTo(Phase2.Node p0)
	{
		Command command = new Command(globalID, "compareTo", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, true);

		try
		{
			return (Integer) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Integer) null;
	}

	public volatile int compareTo(java.lang.Object p0)
	{
		Command command = new Command(globalID, "compareTo", 
								new Class[]{java.lang.Object.class}, 
								new Object[]{p0}, true);

		try
		{
			return (Integer) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Integer) null;
	}

	public java.lang.String toString()
	{
		Command command = new Command(globalID, "toString", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (java.lang.String) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (java.lang.String) null;
	}

	private Phase2.Node find(Integer p0, Phase2.Node p1)
	{
		Command command = new Command(globalID, "find", 
								new Class[]{Integer.class, Phase2.Node.class}, 
								new Object[]{p0, p1}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	public Phase2.Node getParent()
	{
		Command command = new Command(globalID, "getParent", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	private void init()
	{
		Command command = new Command(globalID, "init", 
								new Class[]{}, 
								new Object[]{}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public Phase2.Node remove()
	{
		Command command = new Command(globalID, "remove", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}

	public int getId()
	{
		Command command = new Command(globalID, "getId", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Integer) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Integer) null;
	}

	public Phase2.NodeState getState()
	{
		Command command = new Command(globalID, "getState", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.NodeState) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.NodeState) null;
	}

	public void insert(Phase2.Node p0)
	{
		Command command = new Command(globalID, "insert", 
								new Class[]{Phase2.Node.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public void accept(plugin.Visitor p0, java.lang.Object p1)
	{
		Command command = new Command(globalID, "accept", 
								new Class[]{plugin.Visitor.class, java.lang.Object.class}, 
								new Object[]{p0, p1}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public void setState(Phase2.NodeState p0)
	{
		Command command = new Command(globalID, "setState", 
								new Class[]{Phase2.NodeState.class}, 
								new Object[]{p0}, false);

		try
		{
			Client.voidSendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

	}

	public int getHeight()
	{
		Command command = new Command(globalID, "getHeight", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Integer) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Integer) null;
	}

	public Phase2.Node getChild()
	{
		Command command = new Command(globalID, "getChild", 
								new Class[]{}, 
								new Object[]{}, true);

		try
		{
			return (Phase2.Node) Client.sendData(globalID, command);
		}

		catch (IOException e)
		{
			e.printStackTrace();
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}

		return (Phase2.Node) null;
	}


}
